AEPutPtr
AEPutPtr Put data into descriptor record; add to descriptor list
#include <AppleEvents.h> Apple Event Manager
OSErr AEPutPtr ( theAEDescList, index, typeCode, dataPtr, dataSize );
AEDescList * theAEDescList ; descriptor list to which descriptor record added
long index ; position in list for added descriptor record
DescType typeCode ; descriptor type of added descriptor record
Ptr dataPtr ; pointer to data for the descriptor record
Size dataSize ; size of the descriptor record
returns Error Code; 0 = no error
The AEPutPtr function takes data specified in a buffer and converts it to a
descriptor record that it adds to a descriptor list.
The parameter theAEDescList is the descriptor list to which to add a
descriptor record.
The index parameter is the position in the list for the descriptor record (for
example, 2 specifies that it must be the second descriptor record). If there
was already a descriptor record at that position, it is replaced. If the value of
index is 0, the descriptor record is added at the end of the list.
The typeCode parameter is the descriptor type for the resulting descriptor
record.
The dataPtr parameter is a pointer to the data for the descriptor record.
The dataSize parameter is the length, in bytes, of the data for the descriptor
record.
Result codes
noErr (0) No error
memFullErr (-108) Not enough room in heap zone
errAEWrongDataType (-1703) Wrong descriptor type
errAENotAEDesc (-1704) Not a valid descriptor record
errAEBadListItem (-1705) Operation involving a list item failed
errAEIllegalIndex (-1719) Not a valid list index